<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::post('upimg', 'CommonController@upload');
Route::get('img/{dir}-{id}/{width?}-{height?}-{upsize?}', 'CommonController@img');
Route::any('laravel-u-editor-server/server', 'caonimaController@server');
Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
]);

//后台路由组
Route::controllers(['admin/auth' => 'Admin\AuthController']);
Route::group(['middleware' => ['adminAuth'],'prefix'=>'admin','namespace'=>'Admin'],function(){
   Route::controllers([
       'sys'   => 'SysController',
       'item'  => 'ItemController',
       '/'      => 'AdminController'
   ]);
    //Route::get('item','ItemController@index');
});
//前台路由组
Route::group(['namespace'=>'Site'],function(){
    Route::controllers([

        'contact'  => 'ContactController',//联系我们

        'news'   => 'NewsController',//最新通告
        'pro'    => 'ProController',//作品控制器
        'course' => 'CourseController',//半永久培训控制器
        'courses' => 'CoursesController',//新娘装培训

        'signup' => 'SignupController',//报名控制器
        'about'  => 'AboutController',//关于我们
        '/'      => 'IndexController',//首页
    ]);
});